Throttle braking
It is possible to use the throttle input as a brake. Part of the throttle range is used for braking and the other part for acceleration.
ASC for the throttle input is set in the way that its output is negative when the throttle is released. This negative signal is fed through an independent signal path through signal multiplier comlvl
(defines braking force) and speed-dependent braking block. This block allows to setting speed level where the throttle braking is deactivated (comlvlspeedlo
) and the speed level above which is the braking force maximal (comlvlspeedhi
). The braking force is linearly increasing/decreasing between these two levels (check pictures below). This feature is only available if using the drvopts
parameter the comlvl
feature is enabled.
The general signal flow for throttle braking is depicted here:
Configuration steps
Enabling throttle braking
Set the drvopts
parameter to value 4.
The drvopts
is a bitwise parameter, each bit has some function. In this documentation is described only the 2th bit.
If you do not enable the comlvl feature, the negative throttle value will cause reversing!
Setting the braking range on the throttle
- As the first thing, ensure that you have set the minimum and maximum values for the throttle signal in the
/acc/asc
folder. - Then set the
center
parameter in the/acc/asc
folder. This is the value when the braking and throttle signals are separated. Below this value, the signal is used for braking, and above for acceleration. - Disable the lower deadzone in the
/acc/csc
folder. This is done by setting theldz
parameter to 0. This will remove a gap between the braking and acceleration.
Setting the braking force
If the brake is applied, the comlvl
is a command to the driver and the /driver/ìrefr
is the reference for the phase current. More about braking current reference
The comlvl
parameter is located in each map folder (/maps/mapX
). Tune this parameter to set maximum braking for each map. More about maps.
- The actual braking signal (only from the throttle brake) is visible in the
/brake/sig_combrake
state variable. - The actual
comlvl
value is visible in the/brake/comlvl
state variable.
Setting the speed-dependent braking
Using parameters/brake/comlvlspeedlo
and /brake/comlvlspeedhi
you can set the speed range where the throttle braking is active. Check the picture above for more information.
To make this work, it is necessary to have properly configured speed measurement. Check the speed measurement documentation.